From 5155cff8d1ad99990573c17a6ded36a243ff0efb Mon Sep 17 00:00:00 2001 From: Mathias Hasselmann Date: Fri, 28 Dec 2007 22:11:35 +0000 Subject: [PATCH] Remove max_detail_height field from GtkCalendarPrivate. (#339540) * gtk/gtkcalendar.c: Drop max_detail_height field, and use a local variable instead in gtk_calendar_size_request. svn path=/trunk/; revision=19286 --- ChangeLog | 7 +++++++ gtk/gtkcalendar.c | 13 ++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75941e8102..dc50a3afb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-28 Mathias Hasselmann + + Remove max_detail_height field from GtkCalendarPrivate. (#339540) + + * gtk/gtkcalendar.c: Drop max_detail_height field, and use + a local variable instead in gtk_calendar_size_request. + 2007-12-28 Matthias Clasen * tests/defaultvaluetest.c: Add enough exclusions to make the diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index c91858e718..b9cdfa9b9b 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -257,7 +257,6 @@ struct _GtkCalendarPrivate guint arrow_width; guint max_month_width; guint max_year_width; - guint max_detail_height; guint day_width; guint week_width; @@ -1767,7 +1766,8 @@ gtk_calendar_size_request (GtkWidget *widget, gint max_header_height = 0; gint focus_width; gint focus_padding; - + gint max_detail_height; + gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, "focus-padding", &focus_padding, @@ -1874,7 +1874,7 @@ gtk_calendar_size_request (GtkWidget *widget, /* Calculate detail extents. Do this as late as possible since * pango_layout_set_markup is called which alters font settings. */ - priv->max_detail_height = 0; + max_detail_height = 0; if (priv->detail_func && (calendar->display_flags & GTK_CALENDAR_SHOW_DETAILS)) { @@ -1904,11 +1904,10 @@ gtk_calendar_size_request (GtkWidget *widget, pango_layout_set_markup (layout, markup, -1); pango_layout_get_pixel_extents (layout, NULL, &logical_rect); - if (priv->detail_width_chars) priv->min_day_width = MAX (priv->min_day_width, logical_rect.width); if (priv->detail_height_rows) - priv->max_detail_height = MAX (priv->max_detail_height, logical_rect.height); + max_detail_height = MAX (max_detail_height, logical_rect.height); } if (!priv->detail_width_chars || !priv->detail_height_rows) @@ -1933,7 +1932,7 @@ gtk_calendar_size_request (GtkWidget *widget, if (!priv->detail_width_chars) priv->min_day_width = MAX (priv->min_day_width, logical_rect.width); if (!priv->detail_height_rows) - priv->max_detail_height = MAX (priv->max_detail_height, logical_rect.height); + max_detail_height = MAX (max_detail_height, logical_rect.height); g_free (markup); } @@ -1979,7 +1978,7 @@ gtk_calendar_size_request (GtkWidget *widget, priv->main_h = (CALENDAR_MARGIN + calendar_margin + 6 * (priv->max_day_char_ascent + priv->max_day_char_descent - + priv->max_detail_height + + max_detail_height + 2 * (focus_padding + focus_width)) + DAY_YSEP * 5); -- 2.30.2